Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixmix/new sdk rc #263

Merged
merged 7 commits into from
Oct 23, 2024
Merged

Mixmix/new sdk rc #263

merged 7 commits into from
Oct 23, 2024

Conversation

mixmix
Copy link
Contributor

@mixmix mixmix commented Oct 22, 2024

tweeeeks

this PR is just test readability. Sometimes when I'm reviewing I have to move things into chunks of related logic to be able to follow the logic. Thought I'd post the changes and see you agree

there is 1 test where I sharpen the test to an exact value

const { entropy: naynay } = await setupTest(t, { networkType })
// await run('jump-start network', jumpStartNetwork(entropy))
const { run, entropy: naynay } = await setupTest(t)
await run('fund naynay', fundAccount(t, naynay))
Copy link
Contributor Author

@mixmix mixmix Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I loved the pattern you started extracting some other setup. I noticed that we want a funded account which is just "set up" for us and that extracting it made the tests a whole lot simpler (to my mind any way)

Comment on lines 15 to 17
const transfer = new EntropyTransfer(entropy, endpoint)
const account = new EntropyAccount(entropy, endpoint)
const faucet = new EntropyFaucet(entropy, endpoint)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

less words means less reading. I'm pretty happy we're not gonna get collisions and am watching closely for that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rest of this file, I shuffled lines around such that there are groupings like

- prep
- action
- test

- prep
- action
- test

This is fully an opinionated style thing, but it makes reading quicker because the relevant context is grouped into parcels. 🤷

tests/faucet.test.ts Outdated Show resolved Hide resolved
tests/faucet.test.ts Outdated Show resolved Hide resolved
mixmix and others added 2 commits October 23, 2024 13:37
Co-authored-by: Nayyir Jutha <nayyir.jutha@gmail.com>
Co-authored-by: Nayyir Jutha <nayyir.jutha@gmail.com>
@mixmix
Copy link
Contributor Author

mixmix commented Oct 23, 2024

Thanks for the review, Good catches you made there.
Ready for review (+ merge?)

@rh0delta rh0delta merged commit 6b807bf into naynay/new-sdk-rc Oct 23, 2024
2 checks passed
@rh0delta rh0delta deleted the mixmix/new-sdk-rc branch October 23, 2024 18:53
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants